package com.tech.repository.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
	private Integer uid;
	private String uname;
	private String upassword;
	private String uemail;

	public User(Integer uid) {
		this.uid = uid;
	}

	/**
	 * 创建新用户
	 *
	 * @param uname     新用户名
	 * @param upassword 用户密码
	 */
	public User(String uname, String upassword) {
		this(null, uname, upassword, null);
	}

	/**
	 * 创建新用户
	 *
	 * @param uname     新用户名
	 * @param upassword 用户密码
	 * @param uemail    用户邮箱
	 */
	public User(String uname, String upassword, String uemail) {
		this(null, uname, upassword, uemail);
	}
}
